home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / Illustrator 6.0 SDK r1 Mac / AI Plugin Interface / AITextRun.h < prev    next >
Text File  |  1995-12-21  |  4KB  |  163 lines

  1. /**
  2.  
  3.     AITextRun.h
  4.     Copyright (c) 1995 Adobe Systems Incorporated.
  5.     All Rights Reserved
  6.  
  7.     Adobe Illustrator 6.0 Text Run Object Suite.
  8.  
  9.  **/
  10.  
  11. #ifndef __AITextRun__
  12. #define __AITextRun__
  13.  
  14.  
  15. /*******************************************************************************
  16.  **
  17.  **    Imports
  18.  **
  19.  **/
  20.  
  21. #include "AITypes.h"
  22. #include "AIArt.h"
  23. #include "AIFixedMath.h"
  24. #include "AIPathStyle.h"
  25. #include "AITextFaceStyle.h"
  26.  
  27.  
  28. #if Macintosh
  29.     #ifdef __cplusplus
  30.     extern "C" {
  31.     #endif
  32.     
  33.     #if PRAGMA_ALIGN_SUPPORTED
  34.     #pragma options align=mac68k
  35.     #endif
  36.     
  37.     #if PRAGMA_IMPORT_SUPPORTED
  38.     #pragma import on
  39.     #endif
  40. #endif
  41.  
  42.  
  43. /*******************************************************************************
  44.  **
  45.  **    Constants
  46.  **
  47.  **/
  48.  
  49. #define kAITextRunSuite        "AI Text Run Suite"
  50. #define kAITextRunVersion    3
  51.  
  52.  
  53. typedef enum {
  54.     kUnknownStyle = 0,
  55.     kStartStyle,
  56.     kCenterStyle,
  57.     kLimitStyle,
  58.     kJustifiedStyle,
  59.     kBlockedStyle
  60. } AILineStyle;
  61.  
  62.  
  63. /*******************************************************************************
  64.  **
  65.  **    Types
  66.  **
  67.  **/
  68.  
  69. typedef struct {
  70.     Fixed size;
  71.     Fixed offset;
  72.     Fixed leading;
  73.     Fixed tracking;
  74.     FixedPoint scaling;
  75.     Boolean kerning;
  76. } AICharStyle;
  77.  
  78. typedef struct {
  79.     Fixed minimum;
  80.     Fixed optimal;
  81.     Fixed maximum;
  82. } AIGlueStyle;
  83.  
  84. typedef struct {
  85.     Boolean hyphenateIndividualWords;
  86.     Boolean limitConsecutiveHyphenations;
  87.     
  88.     short minimumCharactersBeforeHyphen;
  89.     short minimumCharactersAfterHyphen;
  90.     short maximumConsecutiveHyphenatedLines;
  91. } AIHyphenStyle;
  92.  
  93. typedef struct {
  94.     Fixed leading;
  95.     
  96.     AIGlueStyle wordGlue;
  97.     AIGlueStyle charGlue;
  98.     
  99.     Fixed firstMargin;
  100.     Fixed startMargin;
  101.     Fixed limitMargin;
  102.     
  103.     AILineStyle alignment;
  104.     Boolean hangingPunctuation;
  105.     Boolean bindingPunctuation;
  106.     AIHyphenStyle hyphenation;
  107. } AIParaStyle;
  108.  
  109. typedef struct {
  110.     Fixed kerning;
  111. } AIKernStyle;
  112.  
  113.  
  114. /*******************************************************************************
  115.  **
  116.  **    Suite
  117.  **
  118.  **/
  119.  
  120. typedef struct {
  121.  
  122.     MACPASCAL FXErr (*GetFirstTextRun) ( AIArtHandle parent, AIArtHandle *first );
  123.     MACPASCAL FXErr (*GetNextTextRun) ( AIArtHandle parent, AIArtHandle child, AIArtHandle *next );
  124.  
  125.     MACPASCAL FXErr (*InsertTextRun) ( AIArtHandle parent, AIArtHandle child, AIArtHandle *clone );
  126.     MACPASCAL FXErr (*AppendTextRun) ( AIArtHandle parent, AIArtHandle child, AIArtHandle *clone );
  127.     MACPASCAL FXErr (*DeleteTextRun) ( AIArtHandle parent, AIArtHandle child );
  128.     
  129.     MACPASCAL FXErr (*GetTextRunByteCount) ( AIArtHandle run, short *count );
  130.     MACPASCAL FXErr (*SetTextRunByteCount) ( AIArtHandle run, short count );
  131.     MACPASCAL FXErr (*GetTextRunByteCodes) ( AIArtHandle run, short index, short count, unsigned char *codes );
  132.     MACPASCAL FXErr (*SetTextRunByteCodes) ( AIArtHandle run, short index, short count, unsigned char *codes );
  133.     MACPASCAL FXErr (*GetTextRunPathStyle) ( AIArtHandle run, AIPathStyle *pathStyle );
  134.     MACPASCAL FXErr (*SetTextRunPathStyle) ( AIArtHandle run, AIPathStyle *pathStyle );
  135.     MACPASCAL FXErr (*GetTextRunFaceStyle) ( AIArtHandle run, AIFaceStyle *faceStyle );
  136.     MACPASCAL FXErr (*SetTextRunFaceStyle) ( AIArtHandle run, AIFaceStyle *faceStyle );
  137.     MACPASCAL FXErr (*GetTextRunCharStyle) ( AIArtHandle run, AICharStyle *charStyle );
  138.     MACPASCAL FXErr (*SetTextRunCharStyle) ( AIArtHandle run, AICharStyle *charStyle );
  139.     MACPASCAL FXErr (*GetTextRunParaStyle) ( AIArtHandle run, AIParaStyle *paraStyle );
  140.     MACPASCAL FXErr (*SetTextRunParaStyle) ( AIArtHandle run, AIParaStyle *paraStyle );
  141.     MACPASCAL FXErr (*GetTextRunKernStyle) ( AIArtHandle run, AIKernStyle *kernStyle );
  142.     MACPASCAL FXErr (*SetTextRunKernStyle) ( AIArtHandle run, AIKernStyle *kernStyle );
  143.  
  144. } AITextRunSuite;
  145.  
  146.  
  147. #if Macintosh
  148.     #if PRAGMA_IMPORT_SUPPORTED
  149.     #pragma import off
  150.     #endif
  151.     
  152.     #if PRAGMA_ALIGN_SUPPORTED
  153.     #pragma options align=reset
  154.     #endif
  155.     
  156.     #ifdef __cplusplus
  157.     }
  158.     #endif
  159. #endif
  160.  
  161.  
  162. #endif
  163.